.class public final Lrexsee/barcode/BarcodeCaptureDialog;
.super Landroid/app/Dialog;
.source "BarcodeCaptureDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    }
.end annotation


# static fields
.field private static final BEEP_VOLUME:F = 0.1f

.field private static final BULK_MODE_SCAN_DELAY_MS:J = 0x3e8L

.field private static final COMMA_PATTERN:Ljava/util/regex/Pattern;

.field private static final DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Set",
            "<",
            "Lcom/google/zxing/ResultMetadataType;",
            ">;"
        }
    .end annotation
.end field

.field private static final FORMATS_DATA_MATRIX:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/google/zxing/BarcodeFormat;",
            ">;"
        }
    .end annotation
.end field

.field private static final FORMATS_ONE_D:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/google/zxing/BarcodeFormat;",
            ">;"
        }
    .end annotation
.end field

.field private static final FORMATS_PRODUCT:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/google/zxing/BarcodeFormat;",
            ">;"
        }
    .end annotation
.end field

.field private static final FORMATS_QR_CODE:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/google/zxing/BarcodeFormat;",
            ">;"
        }
    .end annotation
.end field

.field private static final MAX_FRAME_HEIGHT:I = 0x168

.field private static final MAX_FRAME_WIDTH:I = 0x1e0

.field private static final MIN_FRAME_HEIGHT:I = 0xf0

.field private static final MIN_FRAME_WIDTH:I = 0xf0

.field private static final TEN_DESIRED_ZOOM:I = 0x1b

.field private static final VIBRATE_DURATION:J = 0xc8L


# instance fields
.field final mAutoFocusCallback:Lrexsee/barcode/CameraAutoFocusCallback;

.field private final mBeep:Z

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field final mCamera:Landroid/hardware/Camera;

.field mCameraResolution:Landroid/graphics/Point;

.field mCaptureHandler:Lrexsee/barcode/CaptureHandler;

.field final mCharacterSet:Ljava/lang/String;

.field private final mContext:Landroid/content/Context;

.field final mDecodeFormats:Ljava/util/Vector;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Vector",
            "<",
            "Lcom/google/zxing/BarcodeFormat;",
            ">;"
        }
    .end annotation
.end field

.field private final mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

.field final mFramingRect:Landroid/graphics/Rect;

.field final mFramingRectInPreview:Landroid/graphics/Rect;

.field private final mOnScanSuccessed:Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;

.field private final mOriginalScreenOrientation:Ljava/lang/String;

.field final mPreviewCallback:Lrexsee/barcode/CameraPreviewCallback;

.field mPreviewFormat:I

.field mPreviewFormatString:Ljava/lang/String;

.field mPreviewing:Z

.field private final mScreen:Lrexsee/device/RexseeScreen;

.field mScreenResolution:Landroid/graphics/Point;

.field final mUseOneShotPreviewCallback:Z

.field private final mVibrate:Z

.field final mViewfinderView:Lrexsee/barcode/ViewfinderView;

.field private mediaPlayer:Landroid/media/MediaPlayer;


# direct methods
.method static constructor <clinit>()V
    .locals 4

    .prologue
    const/4 v3, 0x5

    const/4 v2, 0x1

    .line 54
    const-string v0, ","

    invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

    move-result-object v0

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->COMMA_PATTERN:Ljava/util/regex/Pattern;

    .line 63
    new-instance v0, Ljava/util/HashSet;

    invoke-direct {v0, v3}, Ljava/util/HashSet;-><init>(I)V

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    .line 64
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    sget-object v1, Lcom/google/zxing/ResultMetadataType;->ISSUE_NUMBER:Lcom/google/zxing/ResultMetadataType;

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 65
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    sget-object v1, Lcom/google/zxing/ResultMetadataType;->SUGGESTED_PRICE:Lcom/google/zxing/ResultMetadataType;

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 66
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    sget-object v1, Lcom/google/zxing/ResultMetadataType;->ERROR_CORRECTION_LEVEL:Lcom/google/zxing/ResultMetadataType;

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 67
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    sget-object v1, Lcom/google/zxing/ResultMetadataType;->POSSIBLE_COUNTRY:Lcom/google/zxing/ResultMetadataType;

    invoke-interface {v0, v1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z

    .line 75
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0, v3}, Ljava/util/Vector;-><init>(I)V

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    .line 76
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->UPC_A:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 77
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->UPC_E:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 78
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->EAN_13:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 79
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->EAN_8:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 80
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->RSS14:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 81
    new-instance v0, Ljava/util/Vector;

    sget-object v1, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    invoke-virtual {v1}, Ljava/util/Vector;->size()I

    move-result v1

    add-int/lit8 v1, v1, 0x4

    invoke-direct {v0, v1}, Ljava/util/Vector;-><init>(I)V

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    .line 82
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    sget-object v1, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_PRODUCT:Ljava/util/Vector;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->addAll(Ljava/util/Collection;)Z

    .line 83
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_39:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 84
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_93:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 85
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->CODE_128:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 86
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->ITF:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 87
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0, v2}, Ljava/util/Vector;-><init>(I)V

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_QR_CODE:Ljava/util/Vector;

    .line 88
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_QR_CODE:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->QR_CODE:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 89
    new-instance v0, Ljava/util/Vector;

    invoke-direct {v0, v2}, Ljava/util/Vector;-><init>(I)V

    sput-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_DATA_MATRIX:Ljava/util/Vector;

    .line 90
    sget-object v0, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_DATA_MATRIX:Ljava/util/Vector;

    sget-object v1, Lcom/google/zxing/BarcodeFormat;->DATA_MATRIX:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v0, v1}, Ljava/util/Vector;->add(Ljava/lang/Object;)Z

    .line 48
    return-void
.end method

.method public constructor <init>(Lrexsee/core/browser/Browser;Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;ZZZ)V
    .locals 24
    .param p1, "browser"    # Lrexsee/core/browser/Browser;
    .param p2, "onScanSuccessed"    # Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    .param p3, "playBeep"    # Z
    .param p4, "vibrate"    # Z
    .param p5, "flash"    # Z

    .prologue
    .line 124
    invoke-virtual/range {p1 .. p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v5

    const v6, 0x1030059

    move-object/from16 v0, p0

    move-object v1, v5

    move v2, v6

    invoke-direct {v0, v1, v2}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 108
    sget-object v5, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static {v5}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v5

    const/4 v6, 0x3

    if-le v5, v6, :cond_3

    const/4 v5, 0x1

    :goto_0
    move v0, v5

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mUseOneShotPreviewCallback:Z

    .line 115
    const/4 v5, 0x0

    move v0, v5

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mPreviewing:Z

    .line 126
    invoke-virtual/range {p1 .. p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v5

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    .line 127
    move-object/from16 v0, p1

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mBrowser:Lrexsee/core/browser/Browser;

    .line 128
    move-object/from16 v0, p0

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

    .line 130
    move-object/from16 v0, p1

    iget-object v0, v0, Lrexsee/core/browser/Browser;->interfaceList:Lrexsee/core/browser/clazz/JavascriptInterfaceList;

    move-object v5, v0

    new-instance v6, Ljava/lang/StringBuilder;

    move-object/from16 v0, p1

    iget-object v0, v0, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    move-object v7, v0

    iget-object v7, v7, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v7, v7, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v7}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    invoke-direct {v6, v7}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v7, "Screen"

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Lrexsee/core/browser/clazz/JavascriptInterfaceList;->get(Ljava/lang/String;)Lrexsee/core/browser/clazz/JavascriptInterface;

    move-result-object v5

    check-cast v5, Lrexsee/device/RexseeScreen;

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mScreen:Lrexsee/device/RexseeScreen;

    .line 131
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreen:Lrexsee/device/RexseeScreen;

    move-object v5, v0

    iget-object v5, v5, Lrexsee/device/RexseeScreen;->screenOrientation:Ljava/lang/String;

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mOriginalScreenOrientation:Ljava/lang/String;

    .line 133
    :try_start_0
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreen:Lrexsee/device/RexseeScreen;

    move-object v5, v0

    const-string v6, "landscape"

    invoke-virtual {v5, v6}, Lrexsee/device/RexseeScreen;->setScreenOrientation(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 138
    :goto_1
    move-object/from16 v0, p2

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mOnScanSuccessed:Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;

    .line 139
    const/4 v5, 0x0

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mCharacterSet:Ljava/lang/String;

    .line 140
    new-instance v5, Ljava/util/Vector;

    invoke-direct {v5}, Ljava/util/Vector;-><init>()V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mDecodeFormats:Ljava/util/Vector;

    .line 141
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mDecodeFormats:Ljava/util/Vector;

    move-object v5, v0

    sget-object v6, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_ONE_D:Ljava/util/Vector;

    invoke-virtual {v5, v6}, Ljava/util/Vector;->addAll(Ljava/util/Collection;)Z

    .line 142
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mDecodeFormats:Ljava/util/Vector;

    move-object v5, v0

    sget-object v6, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_QR_CODE:Ljava/util/Vector;

    invoke-virtual {v5, v6}, Ljava/util/Vector;->addAll(Ljava/util/Collection;)Z

    .line 143
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mDecodeFormats:Ljava/util/Vector;

    move-object v5, v0

    sget-object v6, Lrexsee/barcode/BarcodeCaptureDialog;->FORMATS_DATA_MATRIX:Ljava/util/Vector;

    invoke-virtual {v5, v6}, Ljava/util/Vector;->addAll(Ljava/util/Collection;)Z

    .line 145
    move/from16 v0, p4

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mVibrate:Z

    .line 146
    if-eqz p3, :cond_5

    .line 147
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object/from16 p2, v0

    .end local p2    # "onScanSuccessed":Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    check-cast p2, Landroid/app/Activity;

    const-string v5, "audio"

    move-object/from16 v0, p2

    move-object v1, v5

    invoke-virtual {v0, v1}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Landroid/media/AudioManager;

    .line 148
    .local v11, "audioService":Landroid/media/AudioManager;
    invoke-virtual {v11}, Landroid/media/AudioManager;->getRingerMode()I

    move-result v5

    const/4 v6, 0x2

    if-eq v5, v6, :cond_4

    .line 149
    const/4 v5, 0x0

    move v0, v5

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mBeep:Z

    .line 174
    .end local v11    # "audioService":Landroid/media/AudioManager;
    :goto_2
    if-eqz p5, :cond_0

    .line 176
    const/4 v5, 0x1

    :try_start_1
    move-object/from16 v0, p0

    move v1, v5

    invoke-direct {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog;->setFlashlight(Z)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2

    .line 182
    :cond_0
    :goto_3
    new-instance v5, Lrexsee/barcode/BarcodeCaptureDialog$2;

    move-object v0, v5

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog$2;-><init>(Lrexsee/barcode/BarcodeCaptureDialog;)V

    move-object/from16 v0, p0

    move-object v1, v5

    invoke-virtual {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog;->setOnKeyListener(Landroid/content/DialogInterface$OnKeyListener;)V

    .line 197
    :try_start_2
    invoke-virtual/range {p0 .. p0}, Lrexsee/barcode/BarcodeCaptureDialog;->getWindow()Landroid/view/Window;

    move-result-object v23

    .line 198
    .local v23, "window":Landroid/view/Window;
    const/16 v5, 0x80

    move-object/from16 v0, v23

    move v1, v5

    invoke-virtual {v0, v1}, Landroid/view/Window;->addFlags(I)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3

    .line 203
    .end local v23    # "window":Landroid/view/Window;
    :goto_4
    new-instance v14, Landroid/widget/FrameLayout;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object v5, v0

    invoke-direct {v14, v5}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 204
    .local v14, "frame":Landroid/widget/FrameLayout;
    new-instance v20, Landroid/view/SurfaceView;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object v5, v0

    move-object/from16 v0, v20

    move-object v1, v5

    invoke-direct {v0, v1}, Landroid/view/SurfaceView;-><init>(Landroid/content/Context;)V

    .line 205
    .local v20, "surfaceView":Landroid/view/SurfaceView;
    new-instance v5, Lrexsee/barcode/ViewfinderView;

    move-object v0, v5

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lrexsee/barcode/ViewfinderView;-><init>(Lrexsee/barcode/BarcodeCaptureDialog;)V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mViewfinderView:Lrexsee/barcode/ViewfinderView;

    .line 207
    :try_start_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mViewfinderView:Lrexsee/barcode/ViewfinderView;

    move-object v5, v0

    const/4 v6, 0x0

    invoke-virtual {v5, v6}, Lrexsee/barcode/ViewfinderView;->setBackgroundColor(I)V

    .line 208
    move-object v0, v14

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 209
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mViewfinderView:Lrexsee/barcode/ViewfinderView;

    move-object v5, v0

    invoke-virtual {v14, v5}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    .line 210
    move-object/from16 v0, p0

    move-object v1, v14

    invoke-virtual {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog;->setContentView(Landroid/view/View;)V
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_4

    .line 215
    :goto_5
    invoke-static {}, Landroid/hardware/Camera;->open()Landroid/hardware/Camera;

    move-result-object v5

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mCamera:Landroid/hardware/Camera;

    .line 217
    :try_start_4
    invoke-direct/range {p0 .. p0}, Lrexsee/barcode/BarcodeCaptureDialog;->initCamera()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_5

    .line 221
    :goto_6
    new-instance v5, Lrexsee/barcode/CameraPreviewCallback;

    move-object v0, v5

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lrexsee/barcode/CameraPreviewCallback;-><init>(Lrexsee/barcode/BarcodeCaptureDialog;)V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mPreviewCallback:Lrexsee/barcode/CameraPreviewCallback;

    .line 222
    new-instance v5, Lrexsee/barcode/CameraAutoFocusCallback;

    invoke-direct {v5}, Lrexsee/barcode/CameraAutoFocusCallback;-><init>()V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mAutoFocusCallback:Lrexsee/barcode/CameraAutoFocusCallback;

    .line 224
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreen:Lrexsee/device/RexseeScreen;

    move-object v5, v0

    invoke-virtual {v5}, Lrexsee/device/RexseeScreen;->getNoticeBarHeight()I

    move-result v17

    .line 226
    .local v17, "noticeBarHeight":I
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v5, v0

    iget v5, v5, Landroid/graphics/Point;->x:I

    mul-int/lit8 v5, v5, 0x3

    div-int/lit8 v22, v5, 0x4

    .line 227
    .local v22, "width":I
    const/16 v5, 0xf0

    move/from16 v0, v22

    move v1, v5

    if-ge v0, v1, :cond_6

    .line 228
    const/16 v22, 0xf0

    .line 232
    :cond_1
    :goto_7
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v5, v0

    iget v5, v5, Landroid/graphics/Point;->y:I

    mul-int/lit8 v5, v5, 0x3

    div-int/lit8 v15, v5, 0x4

    .line 233
    .local v15, "height":I
    const/16 v5, 0xf0

    if-ge v15, v5, :cond_7

    .line 234
    const/16 v15, 0xf0

    .line 238
    :cond_2
    :goto_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v5, v0

    iget v5, v5, Landroid/graphics/Point;->x:I

    sub-int v5, v5, v22

    div-int/lit8 v16, v5, 0x2

    .line 239
    .local v16, "leftOffset":I
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v5, v0

    iget v5, v5, Landroid/graphics/Point;->y:I

    sub-int v5, v5, v17

    sub-int/2addr v5, v15

    div-int/lit8 v21, v5, 0x2

    .line 240
    .local v21, "topOffset":I
    new-instance v5, Landroid/graphics/Rect;

    add-int v6, v16, v22

    add-int v7, v21, v15

    move-object v0, v5

    move/from16 v1, v16

    move/from16 v2, v21

    move v3, v6

    move v4, v7

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mFramingRect:Landroid/graphics/Rect;

    .line 242
    new-instance v18, Landroid/graphics/Rect;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mFramingRect:Landroid/graphics/Rect;

    move-object v5, v0

    move-object/from16 v0, v18

    move-object v1, v5

    invoke-direct {v0, v1}, Landroid/graphics/Rect;-><init>(Landroid/graphics/Rect;)V

    .line 243
    .local v18, "rect":Landroid/graphics/Rect;
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Rect;->left:I

    move v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->x:I

    mul-int/2addr v5, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->x:I

    div-int/2addr v5, v6

    move v0, v5

    move-object/from16 v1, v18

    iput v0, v1, Landroid/graphics/Rect;->left:I

    .line 244
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Rect;->right:I

    move v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->x:I

    mul-int/2addr v5, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->x:I

    div-int/2addr v5, v6

    move v0, v5

    move-object/from16 v1, v18

    iput v0, v1, Landroid/graphics/Rect;->right:I

    .line 245
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Rect;->top:I

    move v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->y:I

    mul-int/2addr v5, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->y:I

    div-int/2addr v5, v6

    move v0, v5

    move-object/from16 v1, v18

    iput v0, v1, Landroid/graphics/Rect;->top:I

    .line 246
    move-object/from16 v0, v18

    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    move v5, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->y:I

    mul-int/2addr v5, v6

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object v6, v0

    iget v6, v6, Landroid/graphics/Point;->y:I

    div-int/2addr v5, v6

    move v0, v5

    move-object/from16 v1, v18

    iput v0, v1, Landroid/graphics/Rect;->bottom:I

    .line 247
    move-object/from16 v0, v18

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mFramingRectInPreview:Landroid/graphics/Rect;

    .line 249
    invoke-virtual/range {v20 .. v20}, Landroid/view/SurfaceView;->getHolder()Landroid/view/SurfaceHolder;

    move-result-object v19

    .line 250
    .local v19, "surfaceHolder":Landroid/view/SurfaceHolder;
    new-instance v5, Lrexsee/barcode/BarcodeCaptureDialog$3;

    move-object v0, v5

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog$3;-><init>(Lrexsee/barcode/BarcodeCaptureDialog;)V

    move-object/from16 v0, v19

    move-object v1, v5

    invoke-interface {v0, v1}, Landroid/view/SurfaceHolder;->addCallback(Landroid/view/SurfaceHolder$Callback;)V

    .line 268
    const/4 v5, 0x3

    move-object/from16 v0, v19

    move v1, v5

    invoke-interface {v0, v1}, Landroid/view/SurfaceHolder;->setType(I)V

    .line 270
    return-void

    .line 108
    .end local v14    # "frame":Landroid/widget/FrameLayout;
    .end local v15    # "height":I
    .end local v16    # "leftOffset":I
    .end local v17    # "noticeBarHeight":I
    .end local v18    # "rect":Landroid/graphics/Rect;
    .end local v19    # "surfaceHolder":Landroid/view/SurfaceHolder;
    .end local v20    # "surfaceView":Landroid/view/SurfaceView;
    .end local v21    # "topOffset":I
    .end local v22    # "width":I
    .restart local p2    # "onScanSuccessed":Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    :cond_3
    const/4 v5, 0x0

    goto/16 :goto_0

    .line 134
    :catch_0
    move-exception v5

    move-object v12, v5

    .line 135
    .local v12, "e":Ljava/lang/Exception;
    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_1

    .line 152
    .end local v12    # "e":Ljava/lang/Exception;
    .end local p2    # "onScanSuccessed":Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    .restart local v11    # "audioService":Landroid/media/AudioManager;
    :cond_4
    const/4 v5, 0x3

    :try_start_5
    move-object/from16 v0, p0

    move v1, v5

    invoke-virtual {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog;->setVolumeControlStream(I)V

    .line 153
    new-instance v5, Landroid/media/MediaPlayer;

    invoke-direct {v5}, Landroid/media/MediaPlayer;-><init>()V

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    .line 154
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v5, v0

    const/4 v6, 0x3

    invoke-virtual {v5, v6}, Landroid/media/MediaPlayer;->setAudioStreamType(I)V

    .line 155
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v5, v0

    new-instance v6, Lrexsee/barcode/BarcodeCaptureDialog$1;

    move-object v0, v6

    move-object/from16 v1, p0

    invoke-direct {v0, v1}, Lrexsee/barcode/BarcodeCaptureDialog$1;-><init>(Lrexsee/barcode/BarcodeCaptureDialog;)V

    invoke-virtual {v5, v6}, Landroid/media/MediaPlayer;->setOnCompletionListener(Landroid/media/MediaPlayer$OnCompletionListener;)V

    .line 161
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object v5, v0

    invoke-virtual {v5}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v5

    invoke-virtual {v5}, Landroid/content/res/Resources;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v5

    const-string v6, "beep.ogg"

    invoke-virtual {v5, v6}, Landroid/content/res/AssetManager;->openFd(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;

    move-result-object v13

    .line 162
    .local v13, "file":Landroid/content/res/AssetFileDescriptor;
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v5, v0

    invoke-virtual {v13}, Landroid/content/res/AssetFileDescriptor;->getFileDescriptor()Ljava/io/FileDescriptor;

    move-result-object v6

    invoke-virtual {v13}, Landroid/content/res/AssetFileDescriptor;->getStartOffset()J

    move-result-wide v7

    invoke-virtual {v13}, Landroid/content/res/AssetFileDescriptor;->getLength()J

    move-result-wide v9

    invoke-virtual/range {v5 .. v10}, Landroid/media/MediaPlayer;->setDataSource(Ljava/io/FileDescriptor;JJ)V

    .line 163
    invoke-virtual {v13}, Landroid/content/res/AssetFileDescriptor;->close()V

    .line 164
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v5, v0

    const v6, 0x3dcccccd    # 0.1f

    const v7, 0x3dcccccd    # 0.1f

    invoke-virtual {v5, v6, v7}, Landroid/media/MediaPlayer;->setVolume(FF)V

    .line 165
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v5, v0

    invoke-virtual {v5}, Landroid/media/MediaPlayer;->prepare()V
    :try_end_5
    .catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1

    .line 169
    .end local v13    # "file":Landroid/content/res/AssetFileDescriptor;
    :goto_9
    const/4 v5, 0x1

    move v0, v5

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mBeep:Z

    goto/16 :goto_2

    .line 166
    :catch_1
    move-exception v5

    move-object v12, v5

    .line 167
    .local v12, "e":Ljava/io/IOException;
    const/4 v5, 0x0

    move-object v0, v5

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    goto :goto_9

    .line 172
    .end local v11    # "audioService":Landroid/media/AudioManager;
    .end local v12    # "e":Ljava/io/IOException;
    .restart local p2    # "onScanSuccessed":Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    :cond_5
    const/4 v5, 0x0

    move v0, v5

    move-object/from16 v1, p0

    iput-boolean v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mBeep:Z

    goto/16 :goto_2

    .line 177
    .end local p2    # "onScanSuccessed":Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;
    :catch_2
    move-exception v12

    .line 178
    .local v12, "e":Ljava/lang/Exception;
    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_3

    .line 199
    .end local v12    # "e":Ljava/lang/Exception;
    :catch_3
    move-exception v5

    move-object v12, v5

    .line 200
    .restart local v12    # "e":Ljava/lang/Exception;
    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_4

    .line 211
    .end local v12    # "e":Ljava/lang/Exception;
    .restart local v14    # "frame":Landroid/widget/FrameLayout;
    .restart local v20    # "surfaceView":Landroid/view/SurfaceView;
    :catch_4
    move-exception v5

    move-object v12, v5

    .line 212
    .restart local v12    # "e":Ljava/lang/Exception;
    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_5

    .line 218
    .end local v12    # "e":Ljava/lang/Exception;
    :catch_5
    move-exception v12

    .line 219
    .restart local v12    # "e":Ljava/lang/Exception;
    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v5

    move-object/from16 v0, p1

    move-object v1, v5

    move-object v2, v12

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/Exception;)V

    goto/16 :goto_6

    .line 229
    .end local v12    # "e":Ljava/lang/Exception;
    .restart local v17    # "noticeBarHeight":I
    .restart local v22    # "width":I
    :cond_6
    const/16 v5, 0x1e0

    move/from16 v0, v22

    move v1, v5

    if-le v0, v1, :cond_1

    .line 230
    const/16 v22, 0x1e0

    goto/16 :goto_7

    .line 235
    .restart local v15    # "height":I
    :cond_7
    const/16 v5, 0x168

    if-le v15, v5, :cond_2

    .line 236
    const/16 v15, 0x168

    goto/16 :goto_8
.end method

.method static synthetic access$0(Lrexsee/barcode/BarcodeCaptureDialog;)Lrexsee/barcode/BarcodeCaptureDialog;
    .locals 1

    .prologue
    .line 99
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mDialog:Lrexsee/barcode/BarcodeCaptureDialog;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/barcode/BarcodeCaptureDialog;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 98
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method private initCamera()V
    .locals 38

    .prologue
    .line 295
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCamera:Landroid/hardware/Camera;

    move-object/from16 v31, v0

    invoke-virtual/range {v31 .. v31}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;

    move-result-object v18

    .line 297
    .local v18, "parameters":Landroid/hardware/Camera$Parameters;
    invoke-virtual/range {v18 .. v18}, Landroid/hardware/Camera$Parameters;->getPreviewFormat()I

    move-result v31

    move/from16 v0, v31

    move-object/from16 v1, p0

    iput v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mPreviewFormat:I

    .line 298
    const-string v31, "preview-format"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v31

    move-object/from16 v0, v31

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mPreviewFormatString:Ljava/lang/String;

    .line 299
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object/from16 v31, v0

    const-string v32, "window"

    invoke-virtual/range {v31 .. v32}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Landroid/view/WindowManager;

    .line 300
    .local v8, "manager":Landroid/view/WindowManager;
    invoke-interface {v8}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v7

    .line 301
    .local v7, "display":Landroid/view/Display;
    new-instance v31, Landroid/graphics/Point;

    invoke-virtual {v7}, Landroid/view/Display;->getWidth()I

    move-result v32

    invoke-virtual {v7}, Landroid/view/Display;->getHeight()I

    move-result v33

    invoke-direct/range {v31 .. v33}, Landroid/graphics/Point;-><init>(II)V

    move-object/from16 v0, v31

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    .line 303
    const/16 v31, 0x0

    move-object/from16 v0, v31

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    .line 304
    const-string v31, "preview-size-values"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v20

    .line 306
    .local v20, "previewSizeValueString":Ljava/lang/String;
    if-nez v20, :cond_0

    .line 307
    const-string v31, "preview-size-value"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v20

    .line 309
    :cond_0
    if-eqz v20, :cond_1

    .line 310
    const/4 v3, 0x0

    .local v3, "bestX":I
    const/4 v4, 0x0

    .local v4, "bestY":I
    const v5, 0x7fffffff

    .line 311
    .local v5, "diff":I
    sget-object v31, Lrexsee/barcode/BarcodeCaptureDialog;->COMMA_PATTERN:Ljava/util/regex/Pattern;

    move-object/from16 v0, v31

    move-object/from16 v1, v20

    invoke-virtual {v0, v1}, Ljava/util/regex/Pattern;->split(Ljava/lang/CharSequence;)[Ljava/lang/String;

    move-result-object v31

    move-object/from16 v0, v31

    array-length v0, v0

    move/from16 v32, v0

    const/16 v33, 0x0

    :goto_0
    move/from16 v0, v33

    move/from16 v1, v32

    if-lt v0, v1, :cond_3

    .line 335
    :goto_1
    if-lez v3, :cond_7

    if-lez v4, :cond_7

    new-instance v31, Landroid/graphics/Point;

    move-object/from16 v0, v31

    move v1, v3

    move v2, v4

    invoke-direct {v0, v1, v2}, Landroid/graphics/Point;-><init>(II)V

    :goto_2
    move-object/from16 v0, v31

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    .line 337
    .end local v3    # "bestX":I
    .end local v4    # "bestY":I
    .end local v5    # "diff":I
    :cond_1
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object/from16 v31, v0

    if-nez v31, :cond_2

    .line 339
    new-instance v31, Landroid/graphics/Point;

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object/from16 v32, v0

    move-object/from16 v0, v32

    iget v0, v0, Landroid/graphics/Point;->x:I

    move/from16 v32, v0

    shr-int/lit8 v32, v32, 0x3

    shl-int/lit8 v32, v32, 0x3

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object/from16 v33, v0

    move-object/from16 v0, v33

    iget v0, v0, Landroid/graphics/Point;->y:I

    move/from16 v33, v0

    shr-int/lit8 v33, v33, 0x3

    shl-int/lit8 v33, v33, 0x3

    invoke-direct/range {v31 .. v33}, Landroid/graphics/Point;-><init>(II)V

    move-object/from16 v0, v31

    move-object/from16 v1, p0

    iput-object v0, v1, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    .line 341
    :cond_2
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object/from16 v31, v0

    move-object/from16 v0, v31

    iget v0, v0, Landroid/graphics/Point;->x:I

    move/from16 v31, v0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCameraResolution:Landroid/graphics/Point;

    move-object/from16 v32, v0

    move-object/from16 v0, v32

    iget v0, v0, Landroid/graphics/Point;->y:I

    move/from16 v32, v0

    move-object/from16 v0, v18

    move/from16 v1, v31

    move/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->setPreviewSize(II)V

    .line 344
    sget-object v31, Landroid/os/Build;->MODEL:Ljava/lang/String;

    const-string v32, "Behold II"

    invoke-virtual/range {v31 .. v32}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v31

    if-eqz v31, :cond_8

    sget-object v31, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static/range {v31 .. v31}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v31

    const/16 v32, 0x3

    move/from16 v0, v31

    move/from16 v1, v32

    if-ne v0, v1, :cond_8

    .line 345
    const-string v31, "flash-value"

    const/16 v32, 0x1

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    move/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;I)V

    .line 350
    :goto_3
    const-string v31, "flash-mode"

    const-string v32, "off"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    move-object/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 352
    const-string v31, "zoom-supported"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v30

    .line 353
    .local v30, "zoomSupportedString":Ljava/lang/String;
    if-eqz v30, :cond_9

    invoke-static/range {v30 .. v30}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z

    move-result v31

    if-nez v31, :cond_9

    .line 414
    :goto_4
    return-void

    .line 311
    .end local v30    # "zoomSupportedString":Ljava/lang/String;
    .restart local v3    # "bestX":I
    .restart local v4    # "bestY":I
    .restart local v5    # "diff":I
    :cond_3
    aget-object v19, v31, v33

    .line 312
    .local v19, "previewSize":Ljava/lang/String;
    invoke-virtual/range {v19 .. v19}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v19

    .line 313
    const/16 v34, 0x78

    move-object/from16 v0, v19

    move/from16 v1, v34

    invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(I)I

    move-result v6

    .line 314
    .local v6, "dimPosition":I
    if-gez v6, :cond_5

    .line 311
    :cond_4
    :goto_5
    add-int/lit8 v33, v33, 0x1

    goto/16 :goto_0

    .line 319
    :cond_5
    const/16 v34, 0x0

    :try_start_0
    move-object/from16 v0, v19

    move/from16 v1, v34

    move v2, v6

    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v34

    invoke-static/range {v34 .. v34}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v15

    .line 320
    .local v15, "newX":I
    add-int/lit8 v34, v6, 0x1

    move-object/from16 v0, v19

    move/from16 v1, v34

    invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v34

    invoke-static/range {v34 .. v34}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_0
    .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

    move-result v16

    .line 324
    .local v16, "newY":I
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object/from16 v34, v0

    move-object/from16 v0, v34

    iget v0, v0, Landroid/graphics/Point;->x:I

    move/from16 v34, v0

    sub-int v34, v15, v34

    invoke-static/range {v34 .. v34}, Ljava/lang/Math;->abs(I)I

    move-result v34

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreenResolution:Landroid/graphics/Point;

    move-object/from16 v35, v0

    move-object/from16 v0, v35

    iget v0, v0, Landroid/graphics/Point;->y:I

    move/from16 v35, v0

    sub-int v35, v16, v35

    invoke-static/range {v35 .. v35}, Ljava/lang/Math;->abs(I)I

    move-result v35

    add-int v14, v34, v35

    .line 325
    .local v14, "newDiff":I
    if-nez v14, :cond_6

    .line 326
    move v3, v15

    .line 327
    move/from16 v4, v16

    .line 328
    goto/16 :goto_1

    .line 321
    .end local v14    # "newDiff":I
    .end local v15    # "newX":I
    .end local v16    # "newY":I
    :catch_0
    move-exception v34

    move-object/from16 v17, v34

    .line 322
    .local v17, "nfe":Ljava/lang/NumberFormatException;
    goto :goto_5

    .line 329
    .end local v17    # "nfe":Ljava/lang/NumberFormatException;
    .restart local v14    # "newDiff":I
    .restart local v15    # "newX":I
    .restart local v16    # "newY":I
    :cond_6
    if-ge v14, v5, :cond_4

    .line 330
    move v3, v15

    .line 331
    move/from16 v4, v16

    .line 332
    move v5, v14

    goto :goto_5

    .line 335
    .end local v6    # "dimPosition":I
    .end local v14    # "newDiff":I
    .end local v15    # "newX":I
    .end local v16    # "newY":I
    .end local v19    # "previewSize":Ljava/lang/String;
    :cond_7
    const/16 v31, 0x0

    goto/16 :goto_2

    .line 347
    .end local v3    # "bestX":I
    .end local v4    # "bestY":I
    .end local v5    # "diff":I
    :cond_8
    const-string v31, "flash-value"

    const/16 v32, 0x2

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    move/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;I)V

    goto/16 :goto_3

    .line 354
    .restart local v30    # "zoomSupportedString":Ljava/lang/String;
    :cond_9
    const/16 v24, 0x1b

    .line 355
    .local v24, "tenDesiredZoom":I
    const-string v31, "max-zoom"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 356
    .local v9, "maxZoomString":Ljava/lang/String;
    if-eqz v9, :cond_a

    .line 358
    const-wide/high16 v31, 0x4024000000000000L    # 10.0

    :try_start_1
    invoke-static {v9}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D
    :try_end_1
    .catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_2

    move-result-wide v33

    mul-double v31, v31, v33

    move-wide/from16 v0, v31

    double-to-int v0, v0

    move/from16 v25, v0

    .line 359
    .local v25, "tenMaxZoom":I
    move/from16 v0, v24

    move/from16 v1, v25

    if-le v0, v1, :cond_a

    .line 360
    move/from16 v24, v25

    .line 365
    .end local v25    # "tenMaxZoom":I
    :cond_a
    :goto_6
    const-string v31, "taking-picture-zoom-max"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v22

    .line 366
    .local v22, "takingPictureZoomMaxString":Ljava/lang/String;
    if-eqz v22, :cond_b

    .line 368
    :try_start_2
    invoke-static/range {v22 .. v22}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
    :try_end_2
    .catch Ljava/lang/NumberFormatException; {:try_start_2 .. :try_end_2} :catch_3

    move-result v25

    .line 369
    .restart local v25    # "tenMaxZoom":I
    move/from16 v0, v24

    move/from16 v1, v25

    if-le v0, v1, :cond_b

    .line 370
    move/from16 v24, v25

    .line 375
    .end local v25    # "tenMaxZoom":I
    :cond_b
    :goto_7
    const-string v31, "mot-zoom-values"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v13

    .line 376
    .local v13, "motZoomValuesString":Ljava/lang/String;
    if-eqz v13, :cond_c

    .line 377
    const/16 v23, 0x0

    .line 378
    .local v23, "tenBestValue":I
    sget-object v31, Lrexsee/barcode/BarcodeCaptureDialog;->COMMA_PATTERN:Ljava/util/regex/Pattern;

    move-object/from16 v0, v31

    move-object v1, v13

    invoke-virtual {v0, v1}, Ljava/util/regex/Pattern;->split(Ljava/lang/CharSequence;)[Ljava/lang/String;

    move-result-object v31

    move-object/from16 v0, v31

    array-length v0, v0

    move/from16 v32, v0

    const/16 v33, 0x0

    :goto_8
    move/from16 v0, v33

    move/from16 v1, v32

    if-lt v0, v1, :cond_11

    .line 391
    :goto_9
    move/from16 v24, v23

    .line 393
    .end local v23    # "tenBestValue":I
    :cond_c
    const-string v31, "mot-zoom-step"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->get(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    .line 394
    .local v12, "motZoomStepString":Ljava/lang/String;
    if-eqz v12, :cond_d

    .line 396
    :try_start_3
    invoke-virtual {v12}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v31

    invoke-static/range {v31 .. v31}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D

    move-result-wide v10

    .line 397
    .local v10, "motZoomStep":D
    const-wide/high16 v31, 0x4024000000000000L    # 10.0

    mul-double v31, v31, v10

    move-wide/from16 v0, v31

    double-to-int v0, v0

    move/from16 v27, v0

    .line 398
    .local v27, "tenZoomStep":I
    const/16 v31, 0x1

    move/from16 v0, v27

    move/from16 v1, v31

    if-le v0, v1, :cond_d

    .line 399
    rem-int v31, v24, v27
    :try_end_3
    .catch Ljava/lang/NumberFormatException; {:try_start_3 .. :try_end_3} :catch_4

    sub-int v24, v24, v31

    .line 406
    .end local v10    # "motZoomStep":D
    .end local v27    # "tenZoomStep":I
    :cond_d
    :goto_a
    if-nez v9, :cond_e

    if-eqz v13, :cond_f

    .line 407
    :cond_e
    const-string v31, "zoom"

    move/from16 v0, v24

    int-to-double v0, v0

    move-wide/from16 v32, v0

    const-wide/high16 v34, 0x4024000000000000L    # 10.0

    div-double v32, v32, v34

    invoke-static/range {v32 .. v33}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;

    move-result-object v32

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    move-object/from16 v2, v32

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;Ljava/lang/String;)V

    .line 410
    :cond_f
    if-eqz v22, :cond_10

    .line 411
    const-string v31, "taking-picture-zoom"

    move-object/from16 v0, v18

    move-object/from16 v1, v31

    move/from16 v2, v24

    invoke-virtual {v0, v1, v2}, Landroid/hardware/Camera$Parameters;->set(Ljava/lang/String;I)V

    .line 413
    :cond_10
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCamera:Landroid/hardware/Camera;

    move-object/from16 v31, v0

    move-object/from16 v0, v31

    move-object/from16 v1, v18

    invoke-virtual {v0, v1}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V

    goto/16 :goto_4

    .line 378
    .end local v12    # "motZoomStepString":Ljava/lang/String;
    .restart local v23    # "tenBestValue":I
    :cond_11
    aget-object v21, v31, v33

    .line 379
    .local v21, "stringValue":Ljava/lang/String;
    invoke-virtual/range {v21 .. v21}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v21

    .line 382
    :try_start_4
    invoke-static/range {v21 .. v21}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D
    :try_end_4
    .catch Ljava/lang/NumberFormatException; {:try_start_4 .. :try_end_4} :catch_1

    move-result-wide v28

    .line 386
    .local v28, "value":D
    const-wide/high16 v34, 0x4024000000000000L    # 10.0

    mul-double v34, v34, v28

    move-wide/from16 v0, v34

    double-to-int v0, v0

    move/from16 v26, v0

    .line 387
    .local v26, "tenValue":I
    move/from16 v0, v24

    int-to-double v0, v0

    move-wide/from16 v34, v0

    sub-double v34, v34, v28

    invoke-static/range {v34 .. v35}, Ljava/lang/Math;->abs(D)D

    move-result-wide v34

    sub-int v36, v24, v23

    invoke-static/range {v36 .. v36}, Ljava/lang/Math;->abs(I)I

    move-result v36

    move/from16 v0, v36

    int-to-double v0, v0

    move-wide/from16 v36, v0

    cmpg-double v34, v34, v36

    if-gez v34, :cond_12

    .line 388
    move/from16 v23, v26

    .line 378
    :cond_12
    add-int/lit8 v33, v33, 0x1

    goto/16 :goto_8

    .line 383
    .end local v26    # "tenValue":I
    .end local v28    # "value":D
    :catch_1
    move-exception v17

    .line 384
    .restart local v17    # "nfe":Ljava/lang/NumberFormatException;
    goto/16 :goto_9

    .line 362
    .end local v13    # "motZoomValuesString":Ljava/lang/String;
    .end local v17    # "nfe":Ljava/lang/NumberFormatException;
    .end local v21    # "stringValue":Ljava/lang/String;
    .end local v22    # "takingPictureZoomMaxString":Ljava/lang/String;
    .end local v23    # "tenBestValue":I
    :catch_2
    move-exception v31

    goto/16 :goto_6

    .line 372
    .restart local v22    # "takingPictureZoomMaxString":Ljava/lang/String;
    :catch_3
    move-exception v31

    goto/16 :goto_7

    .line 401
    .restart local v12    # "motZoomStepString":Ljava/lang/String;
    .restart local v13    # "motZoomValuesString":Ljava/lang/String;
    :catch_4
    move-exception v31

    goto :goto_a
.end method

.method private setFlashlight(Z)V
    .locals 14
    .param p1, "enableFlashlight"    # Z

    .prologue
    .line 418
    :try_start_0
    const-string v7, "android.os.ServiceManager"

    invoke-static {v7}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v5

    .line 419
    .local v5, "serviceManagerClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    if-nez v5, :cond_1

    .line 438
    .end local v5    # "serviceManagerClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    :cond_0
    :goto_0
    return-void

    .line 420
    .restart local v5    # "serviceManagerClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    :cond_1
    const-string v7, "getService"

    const/4 v8, 0x1

    new-array v8, v8, [Ljava/lang/Class;

    const/4 v9, 0x0

    const-class v10, Ljava/lang/String;

    aput-object v10, v8, v9

    invoke-virtual {v5, v7, v8}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v2

    .line 421
    .local v2, "getServiceMethod":Ljava/lang/reflect/Method;
    if-eqz v2, :cond_0

    .line 423
    const-string v7, "android.os.IHardwareService$Stub"

    invoke-static {v7}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v4

    .line 424
    .local v4, "iHardwareServiceStubClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    if-eqz v4, :cond_0

    .line 425
    const-string v7, "asInterface"

    const/4 v8, 0x1

    new-array v8, v8, [Ljava/lang/Class;

    const/4 v9, 0x0

    const-class v10, Landroid/os/IBinder;

    aput-object v10, v8, v9

    invoke-virtual {v4, v7, v8}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 426
    .local v0, "asInterfaceMethod":Ljava/lang/reflect/Method;
    if-eqz v0, :cond_0

    .line 428
    const/4 v7, 0x0

    const/4 v8, 0x1

    new-array v8, v8, [Ljava/lang/Object;

    const/4 v9, 0x0

    const/4 v10, 0x0

    const/4 v11, 0x1

    new-array v11, v11, [Ljava/lang/Object;

    const/4 v12, 0x0

    const-string v13, "hardware"

    aput-object v13, v11, v12

    invoke-virtual {v2, v10, v11}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v10

    aput-object v10, v8, v9

    invoke-virtual {v0, v7, v8}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    .line 429
    .local v3, "iHardwareService":Ljava/lang/Object;
    if-eqz v3, :cond_0

    .line 430
    invoke-virtual {v3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v7

    const-string v8, "setFlashlightEnabled"

    const/4 v9, 0x1

    new-array v9, v9, [Ljava/lang/Class;

    const/4 v10, 0x0

    sget-object v11, Ljava/lang/Boolean;->TYPE:Ljava/lang/Class;

    aput-object v11, v9, v10

    invoke-virtual {v7, v8, v9}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v6

    .line 431
    .local v6, "setFlashEnabledMethod":Ljava/lang/reflect/Method;
    if-eqz v6, :cond_0

    .line 433
    const/4 v7, 0x1

    new-array v7, v7, [Ljava/lang/Object;

    const/4 v8, 0x0

    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v9

    aput-object v9, v7, v8

    invoke-virtual {v6, v3, v7}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 435
    .end local v0    # "asInterfaceMethod":Ljava/lang/reflect/Method;
    .end local v2    # "getServiceMethod":Ljava/lang/reflect/Method;
    .end local v3    # "iHardwareService":Ljava/lang/Object;
    .end local v4    # "iHardwareServiceStubClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    .end local v5    # "serviceManagerClass":Ljava/lang/Class;, "Ljava/lang/Class<*>;"
    .end local v6    # "setFlashEnabledMethod":Ljava/lang/reflect/Method;
    :catch_0
    move-exception v7

    move-object v1, v7

    .line 436
    .local v1, "e":Ljava/lang/Exception;
    goto :goto_0
.end method


# virtual methods
.method public decode(Lcom/google/zxing/Result;Landroid/graphics/Bitmap;)V
    .locals 27
    .param p1, "rawResult"    # Lcom/google/zxing/Result;
    .param p2, "barcode"    # Landroid/graphics/Bitmap;

    .prologue
    .line 440
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mBeep:Z

    move v6, v0

    if-eqz v6, :cond_0

    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v6, v0

    if-eqz v6, :cond_0

    .line 441
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mediaPlayer:Landroid/media/MediaPlayer;

    move-object v6, v0

    invoke-virtual {v6}, Landroid/media/MediaPlayer;->start()V

    .line 443
    :cond_0
    move-object/from16 v0, p0

    iget-boolean v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mVibrate:Z

    move v6, v0

    if-eqz v6, :cond_1

    .line 444
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object v6, v0

    const-string v7, "vibrator"

    invoke-virtual {v6, v7}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v26

    check-cast v26, Landroid/os/Vibrator;

    .line 445
    .local v26, "vibrator":Landroid/os/Vibrator;
    const-wide/16 v6, 0xc8

    move-object/from16 v0, v26

    move-wide v1, v6

    invoke-virtual {v0, v1, v2}, Landroid/os/Vibrator;->vibrate(J)V

    .line 448
    .end local v26    # "vibrator":Landroid/os/Vibrator;
    :cond_1
    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getResultPoints()[Lcom/google/zxing/ResultPoint;

    move-result-object v24

    .line 449
    .local v24, "points":[Lcom/google/zxing/ResultPoint;
    if-eqz v24, :cond_2

    move-object/from16 v0, v24

    array-length v0, v0

    move v6, v0

    if-lez v6, :cond_2

    .line 450
    new-instance v5, Landroid/graphics/Canvas;

    move-object v0, v5

    move-object/from16 v1, p2

    invoke-direct {v0, v1}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    .line 451
    .local v5, "canvas":Landroid/graphics/Canvas;
    new-instance v10, Landroid/graphics/Paint;

    invoke-direct {v10}, Landroid/graphics/Paint;-><init>()V

    .line 452
    .local v10, "paint":Landroid/graphics/Paint;
    const v6, 0x106000b

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 453
    const/high16 v6, 0x40400000    # 3.0f

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 454
    sget-object v6, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V

    .line 455
    new-instance v18, Landroid/graphics/Rect;

    const/4 v6, 0x2

    const/4 v7, 0x2

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v8

    const/4 v9, 0x2

    sub-int/2addr v8, v9

    invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v9

    const/4 v11, 0x2

    sub-int/2addr v9, v11

    move-object/from16 v0, v18

    move v1, v6

    move v2, v7

    move v3, v8

    move v4, v9

    invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V

    .line 456
    .local v18, "border":Landroid/graphics/Rect;
    move-object v0, v5

    move-object/from16 v1, v18

    move-object v2, v10

    invoke-virtual {v0, v1, v2}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    .line 457
    const/high16 v6, 0x1060000

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setColor(I)V

    .line 458
    move-object/from16 v0, v24

    array-length v0, v0

    move v6, v0

    const/4 v7, 0x2

    if-ne v6, v7, :cond_4

    .line 459
    const/high16 v6, 0x40800000    # 4.0f

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 460
    const/4 v6, 0x0

    aget-object v6, v24, v6

    invoke-virtual {v6}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v6

    const/4 v7, 0x0

    aget-object v7, v24, v7

    invoke-virtual {v7}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v7

    const/4 v8, 0x1

    aget-object v8, v24, v8

    invoke-virtual {v8}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v8

    const/4 v9, 0x1

    aget-object v9, v24, v9

    invoke-virtual {v9}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v9

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 473
    .end local v5    # "canvas":Landroid/graphics/Canvas;
    .end local v10    # "paint":Landroid/graphics/Paint;
    .end local v18    # "border":Landroid/graphics/Rect;
    :cond_2
    :goto_0
    const/16 v19, 0x0

    .line 474
    .local v19, "bulk":Z
    if-eqz v19, :cond_8

    .line 475
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mBrowser:Lrexsee/core/browser/Browser;

    move-object v6, v0

    invoke-virtual/range {p0 .. p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v7

    const-string v8, "Bulk mode: barcode scanned and saved."

    invoke-virtual {v6, v7, v8}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 476
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCaptureHandler:Lrexsee/barcode/CaptureHandler;

    move-object v6, v0

    if-eqz v6, :cond_3

    .line 478
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mCaptureHandler:Lrexsee/barcode/CaptureHandler;

    move-object v6, v0

    const/4 v7, 0x1

    const-wide/16 v8, 0x3e8

    invoke-virtual {v6, v7, v8, v9}, Lrexsee/barcode/CaptureHandler;->sendEmptyMessageDelayed(IJ)Z

    .line 480
    :cond_3
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mViewfinderView:Lrexsee/barcode/ViewfinderView;

    move-object v6, v0

    const/4 v7, 0x0

    invoke-virtual {v6, v7}, Lrexsee/barcode/ViewfinderView;->setVisibility(I)V

    .line 501
    :goto_1
    return-void

    .line 461
    .end local v19    # "bulk":Z
    .restart local v5    # "canvas":Landroid/graphics/Canvas;
    .restart local v10    # "paint":Landroid/graphics/Paint;
    .restart local v18    # "border":Landroid/graphics/Rect;
    :cond_4
    move-object/from16 v0, v24

    array-length v0, v0

    move v6, v0

    const/4 v7, 0x4

    if-ne v6, v7, :cond_5

    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getBarcodeFormat()Lcom/google/zxing/BarcodeFormat;

    move-result-object v6

    sget-object v7, Lcom/google/zxing/BarcodeFormat;->UPC_A:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v6, v7}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-nez v6, :cond_6

    :cond_5
    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getBarcodeFormat()Lcom/google/zxing/BarcodeFormat;

    move-result-object v6

    sget-object v7, Lcom/google/zxing/BarcodeFormat;->EAN_13:Lcom/google/zxing/BarcodeFormat;

    invoke-virtual {v6, v7}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_7

    .line 463
    :cond_6
    const/4 v6, 0x0

    aget-object v6, v24, v6

    invoke-virtual {v6}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v6

    const/4 v7, 0x0

    aget-object v7, v24, v7

    invoke-virtual {v7}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v7

    const/4 v8, 0x1

    aget-object v8, v24, v8

    invoke-virtual {v8}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v8

    const/4 v9, 0x1

    aget-object v9, v24, v9

    invoke-virtual {v9}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v9

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    .line 464
    const/4 v6, 0x2

    aget-object v6, v24, v6

    invoke-virtual {v6}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v6

    const/4 v7, 0x2

    aget-object v7, v24, v7

    invoke-virtual {v7}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v7

    const/4 v8, 0x3

    aget-object v8, v24, v8

    invoke-virtual {v8}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v8

    const/4 v9, 0x3

    aget-object v9, v24, v9

    invoke-virtual {v9}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v9

    invoke-virtual/range {v5 .. v10}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V

    goto/16 :goto_0

    .line 466
    :cond_7
    const/high16 v6, 0x41200000    # 10.0f

    invoke-virtual {v10, v6}, Landroid/graphics/Paint;->setStrokeWidth(F)V

    .line 467
    move-object/from16 v0, v24

    array-length v0, v0

    move v6, v0

    const/4 v7, 0x0

    :goto_2
    if-ge v7, v6, :cond_2

    aget-object v23, v24, v7

    .line 468
    .local v23, "point":Lcom/google/zxing/ResultPoint;
    invoke-virtual/range {v23 .. v23}, Lcom/google/zxing/ResultPoint;->getX()F

    move-result v8

    invoke-virtual/range {v23 .. v23}, Lcom/google/zxing/ResultPoint;->getY()F

    move-result v9

    invoke-virtual {v5, v8, v9, v10}, Landroid/graphics/Canvas;->drawPoint(FFLandroid/graphics/Paint;)V

    .line 467
    add-int/lit8 v7, v7, 0x1

    goto :goto_2

    .line 482
    .end local v5    # "canvas":Landroid/graphics/Canvas;
    .end local v10    # "paint":Landroid/graphics/Paint;
    .end local v18    # "border":Landroid/graphics/Rect;
    .end local v23    # "point":Lcom/google/zxing/ResultPoint;
    .restart local v19    # "bulk":Z
    :cond_8
    move-object/from16 v0, p0

    iget-object v0, v0, Lrexsee/barcode/BarcodeCaptureDialog;->mViewfinderView:Lrexsee/barcode/ViewfinderView;

    move-object v6, v0

    const/16 v7, 0x8

    invoke-virtual {v6, v7}, Lrexsee/barcode/ViewfinderView;->setVisibility(I)V

    .line 483
    const-string v16, "null"

    .line 485
    .local v16, "metaData":Ljava/lang/String;
    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getResultMetadata()Ljava/util/Hashtable;

    move-result-object v21

    .line 486
    .local v21, "metadata":Ljava/util/Map;, "Ljava/util/Map<Lcom/google/zxing/ResultMetadataType;Ljava/lang/Object;>;"
    if-eqz v21, :cond_a

    .line 487
    new-instance v22, Ljava/lang/StringBuilder;

    const/16 v6, 0x14

    move-object/from16 v0, v22

    move v1, v6

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V

    .line 488
    .local v22, "metadataText":Ljava/lang/StringBuilder;
    invoke-interface/range {v21 .. v21}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v6

    invoke-interface {v6}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v6

    :cond_9
    :goto_3
    invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z

    move-result v7

    if-nez v7, :cond_b

    .line 493
    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->length()I

    move-result v6

    if-lez v6, :cond_a

    .line 494
    invoke-virtual/range {v22 .. v22}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v16

    .line 497
    .end local v22    # "metadataText":Ljava/lang/StringBuilder;
    :cond_a
    invoke-static/range {p1 .. p1}, Lcom/google/zxing/client/result/ResultParser;->parseResult(Lcom/google/zxing/Result;)Lcom/google/zxing/client/result/ParsedResult;

    move-result-object v25

    .line 498
    .local v25, "result":Lcom/google/zxing/client/result/ParsedResult;
    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getBarcodeFormat()Lcom/google/zxing/BarcodeFormat;

    move-result-object v6

    invoke-virtual {v6}, Lcom/google/zxing/BarcodeFormat;->toString()Ljava/lang/String;

    move-result-object v13

    invoke-virtual/range {p1 .. p1}, Lcom/google/zxing/Result;->getText()Ljava/lang/String;

    move-result-object v14

    invoke-virtual/range {v25 .. v25}, Lcom/google/zxing/client/result/ParsedResult;->getType()Lcom/google/zxing/client/result/ParsedResultType;

    move-result-object v6

    invoke-virtual {v6}, Lcom/google/zxing/client/result/ParsedResultType;->toString()Ljava/lang/String;

    move-result-object v15

    invoke-virtual/range {v25 .. v25}, Lcom/google/zxing/client/result/ParsedResult;->getDisplayResult()Ljava/lang/String;

    move-result-object v6

    const-string v7, "\r"

    const-string v8, ""

    invoke-virtual {v6, v7, v8}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/String;->toString()Ljava/lang/String;

    move-result-object v17

    move-object/from16 v11, p0

    move-object/from16 v12, p2

    invoke-virtual/range {v11 .. v17}, Lrexsee/barcode/BarcodeCaptureDialog;->dismissDialog(Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    goto/16 :goto_1

    .line 488
    .end local v25    # "result":Lcom/google/zxing/client/result/ParsedResult;
    .restart local v22    # "metadataText":Ljava/lang/StringBuilder;
    :cond_b
    invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v20

    check-cast v20, Ljava/util/Map$Entry;

    .line 489
    .local v20, "entry":Ljava/util/Map$Entry;, "Ljava/util/Map$Entry<Lcom/google/zxing/ResultMetadataType;Ljava/lang/Object;>;"
    sget-object v7, Lrexsee/barcode/BarcodeCaptureDialog;->DISPLAYABLE_METADATA_TYPES:Ljava/util/Set;

    invoke-interface/range {v20 .. v20}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v8

    invoke-interface {v7, v8}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_9

    .line 490
    invoke-interface/range {v20 .. v20}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v7

    move-object/from16 v0, v22

    move-object v1, v7

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v7

    const/16 v8, 0xa

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    goto :goto_3
.end method

.method dismissDialog(Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 8
    .param p1, "bitmap"    # Landroid/graphics/Bitmap;
    .param p2, "text"    # Ljava/lang/String;
    .param p3, "format"    # Ljava/lang/String;
    .param p4, "type"    # Ljava/lang/String;
    .param p5, "metaData"    # Ljava/lang/String;
    .param p6, "content"    # Ljava/lang/String;

    .prologue
    .line 283
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mCaptureHandler:Lrexsee/barcode/CaptureHandler;

    if-eqz v0, :cond_0

    .line 284
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mCaptureHandler:Lrexsee/barcode/CaptureHandler;

    invoke-virtual {v0}, Lrexsee/barcode/CaptureHandler;->quitSynchronously()V

    .line 285
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mCaptureHandler:Lrexsee/barcode/CaptureHandler;

    .line 287
    :cond_0
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Lrexsee/barcode/BarcodeCaptureDialog;->setFlashlight(Z)V

    .line 288
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mCamera:Landroid/hardware/Camera;

    invoke-virtual {v0}, Landroid/hardware/Camera;->release()V

    .line 289
    invoke-virtual {p0}, Lrexsee/barcode/BarcodeCaptureDialog;->dismiss()V

    .line 290
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mScreen:Lrexsee/device/RexseeScreen;

    iget-object v1, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mOriginalScreenOrientation:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lrexsee/device/RexseeScreen;->setScreenOrientation(Ljava/lang/String;)V

    .line 291
    iget-object v0, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mOnScanSuccessed:Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;

    iget-object v1, p0, Lrexsee/barcode/BarcodeCaptureDialog;->mContext:Landroid/content/Context;

    move-object v2, p1

    move-object v3, p2

    move-object v4, p3

    move-object v5, p4

    move-object v6, p5

    move-object v7, p6

    invoke-virtual/range {v0 .. v7}, Lrexsee/barcode/BarcodeCaptureDialog$OnScanSuccessed;->run(Landroid/content/Context;Landroid/graphics/Bitmap;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 292
    return-void
.end method

.method public startDialog()V
    .locals 4

    .prologue
    const/4 v3, 0x0

    const/4 v2, -0x1

    .line 273
    invoke-virtual {p0}, Lrexsee/barcode/BarcodeCaptureDialog;->show()V

    .line 274
    invoke-virtual {p0}, Lrexsee/barcode/BarcodeCaptureDialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    .line 275
    .local v1, "window":Landroid/view/Window;
    invoke-virtual {v1}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v0

    .line 276
    .local v0, "attr":Landroid/view/WindowManager$LayoutParams;
    iput v3, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    .line 277
    iput v3, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    .line 278
    iput v2, v0, Landroid/view/WindowManager$LayoutParams;->width:I

    .line 279
    iput v2, v0, Landroid/view/WindowManager$LayoutParams;->height:I

    .line 280
    invoke-virtual {v1, v0}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V

    .line 281
    return-void
.end method
